package com.hzncc.flowable_diboot.project_contracts.service;

import com.diboot.core.service.BaseService;
import com.diboot.core.vo.JsonResult;
import com.diboot.core.vo.Pagination;
import com.hzncc.flowable_diboot.project_contracts.dto.ProjectContractAuditDTO;
import com.hzncc.flowable_diboot.project_contracts.entity.ProjectContractAudit;
import com.hzncc.flowable_diboot.project_contracts.vo.ProjectContractAuditDetailVO;
import com.hzncc.flowable_diboot.project_contracts.vo.ProjectContractAuditListVO;
import com.hzncc.flowable_diboot.project_contracts.vo.ProjectContractCancelDetailVO;
import org.springframework.web.multipart.MultipartFile;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
* 项目类合同评审 相关Service接口定义
* @author MyName
* @version 1.0
* @date 2024-09-24
* Copyright © MyCorp
*/
public interface ProjectContractAuditService extends BaseService<ProjectContractAudit> {

    /**
     * 保存项目类合同评审
     *
     * @param projectContractAudit
     * @return
     */
    String saveProjectContractAudit(ProjectContractAuditDetailVO projectContractAudit);

    /**
     * 更新项目类合同评审
     * @param projectContractAudit
     */
    String submitProjectContractAudit(ProjectContractAuditDetailVO projectContractAudit);

    ProjectContractAuditDetailVO copyProjectContractAudit(String id);

    JsonResult<String> changeOfContract(ProjectContractAuditDetailVO projectContractAudit,Boolean submit);

    JsonResult<?> getUpdateDetail(String id);

    JsonResult<?> archiving(String id);

    JsonResult<?> cancelContract(ProjectContractAuditDetailVO projectContractAudit, boolean submit);

    JsonResult<List<ProjectContractAuditListVO>> selectContractAudit(ProjectContractAuditDTO queryDto, Pagination pagination, String type, String permission);

    Map<String,Object> compareChange(ProjectContractAuditDetailVO projectContractAudit, String id);

    Map<String,Object> compareChange(String id);

    List<ProjectContractAuditListVO> getHistory(String code, Pagination pagination);

    Boolean validateCode(String code,String id,String type);

    void pushOa(ProjectContractAuditDetailVO projectContractAudit,String type);

    JsonResult<String> receiveOaApprovalAuditResults(String objectid, String result, String bdcode);

    Map<String, Object> compareChange(ProjectContractAuditDetailVO data);

    void delete(String id);

    JsonResult<?> cancelContract(ProjectContractCancelDetailVO projectContractCancel, boolean submit);

    JsonResult<?> cancelArchiving(String id);

    String printWord(String id);

    /**
     * 导入历史数据
     * @param file
     * @param params
     */
    List<?> importHistoryData(MultipartFile file, Map<String, Object> params) throws IOException, InstantiationException, IllegalAccessException;
}